using System.Collections;
using AppodealAds.Unity.Api;
using UnityEngine;

public class AppodelReklama : MonoBehaviour
{
	private string appKey = "d4a92531707b522426ef7a1a9cd3e9f67689e3ca93662161";

	public int[] CarCount = new int[6] { 1, 2, 3, 5, 7, 13 };

	public int[] HeliCount;

	public int[] bikeCount;

	public int[] tankCount;

	private void Awake()
	{
		//Appodeal.confirm(2);
		//Appodeal.initialize(appKey, 131);
		//Application.targetFrameRate = 45;
	}

	private void Start()
	{
		for (int i = 0; i < CarCount.Length; i++)
		{
			PlayerPrefs.SetInt("Car" + CarCount[i], 1);
		}
		for (int j = 0; j < bikeCount.Length; j++)
		{
			PlayerPrefs.SetInt("Bike" + bikeCount[j], 1);
		}
		PlayerPrefs.SetInt("Player", 1);
	}

	private IEnumerator LoadMenu()
	{
		yield return new WaitForSeconds(4.5f);
		Application.LoadLevel("Menu");
	}

	public static void showInterstetial10()
	{
		int num = Random.Range(1, 100);
		if (num < 10)
		{
			if (Appodeal.isLoaded(2))
			{
				Appodeal.show(2);
			}
		}
		else if (Appodeal.isLoaded(1))
		{
			Appodeal.show(1);
		}
	}

	public static void showInterstetial()
	{
		if (Appodeal.isLoaded(128))
		{
			Appodeal.show(128);
		}
	}
}
